﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Mole
{
    [Serializable]
    public class DirectoryList : INotifyPropertyChanged
    {
        private uint _SiteId;
        private String _SiteUrl;
        private String _FileName;
        private String _FileExt;
        private String _FilePath;
        private String _FileType;
        private long _FileSize;
        private String _FileHashMD5;
        private Boolean _ExtMismatch;
        private Boolean _Malware;
        private String _MalwareName;
        private String _MalwareDetectedBy;

        public event PropertyChangedEventHandler PropertyChanged;

        internal DirectoryList()
        {
        }

        public DirectoryList(uint siteId, String siteUrl, String fileName, string fileExt, string filePath, string fileType, long fileSize, string fileHashMD5, Boolean extMismatch, Boolean malware, string malwareName, string malwareDetectedBy)
        {
            _SiteId = siteId;
            _SiteUrl = siteUrl;
            _FileName = fileName;
            _FileExt = fileExt;
            _FilePath = filePath;
            _FileType = fileType;
            _FileSize = fileSize;
            _FileHashMD5 = fileHashMD5;
            _ExtMismatch = extMismatch;
            _Malware = malware;
            _MalwareName = malwareName;
            _MalwareDetectedBy = malwareDetectedBy;
        }

        #region properties
        public uint SiteId
        {
            get { return _SiteId; }

            set
            {
                _SiteId = value;
                this.NotifyPropertyChanged("SiteID");

            }
        }
        public String SiteUrl
        {
            get { return _SiteUrl; }

            set
            {
                _SiteUrl = value;
                this.NotifyPropertyChanged("SiteURL");

            }
        }
        public String FileName
        {
            get { return _FileName; }

            set
            {
                _FileName = value;
                this.NotifyPropertyChanged("FileName");

            }
        }
        public String FileExt
        {
            get { return _FileExt; }

            set
            {
                _FileExt = value;
                this.NotifyPropertyChanged("FileExt");

            }
        }
        public String FilePath
        {
            get { return _FilePath; }

            set
            {
                _FilePath = value;
                this.NotifyPropertyChanged("FilePath");
            }
        }
        public String FileType
        {
            get { return _FileType; }

            set
            {
                _FileType = value;
                this.NotifyPropertyChanged("FileType");
            }
        }
        public long FileSize
        {
            get { return _FileSize; }

            set
            {
                _FileSize = value;
                this.NotifyPropertyChanged("FileSize");
            }
        }
        public String FileHashMD5
        {
            get { return _FileHashMD5; }

            set
            {
                _FileHashMD5 = value;
                this.NotifyPropertyChanged("FileHashMD5");
            }
        }
        public Boolean ExtMismatch
        {
            get { return _ExtMismatch; }

            set
            {
                _ExtMismatch = value;
                this.NotifyPropertyChanged("ExtMismatch");
            }
        }
        public Boolean Malware
        {
            get { return _Malware; }

            set
            {
                _Malware = value;
                this.NotifyPropertyChanged("Malware");
            }
        }
        public String MalwareName
        {
            get { return _MalwareName; }

            set
            {
                _MalwareName = value;
                this.NotifyPropertyChanged("MalwareName");
            }
        }
        public String MalwareDetectedBy
        {
            get { return _MalwareDetectedBy; }

            set
            {
                _MalwareDetectedBy = value;
                this.NotifyPropertyChanged("MalwareDetectedBy");
            }
        }
        #endregion

        private void NotifyPropertyChanged(String name)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(name));
            }
        }
    }
}
